<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.milk.entity.Members" %>
<html>
<head>
    <title>编辑会员信息</title>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/add_member_form.css">
</head>
<body>
<div class="container">
    <h2>编辑会员信息</h2>
    <form action="<%=request.getContextPath()%>/members/update" method="post" class="add-member-form">
        <input type="hidden" name="id" value="<%=((Members) request.getAttribute("member")).getId()%>">
        <div class="form-group">
            <label for="userName">用户名</label>
            <input type="text" id="userName" name="userName" placeholder="请输入会员用户名" value="<%=((Members) request.getAttribute("member")).getUserName()%>" required>
        </div>
        <div class="form-group">
            <label for="phoneNumber">电话号码</label>
            <input type="text" id="phoneNumber" name="phoneNumber" placeholder="请输入会员电话号码" value="<%=((Members) request.getAttribute("member")).getPhoneNumber()%>" required>
        </div>
        <div class="form-group">
            <label for="points">积分</label>
            <input type="number" id="points" name="points" placeholder="请输入会员积分" value="<%=((Members) request.getAttribute("member")).getPoints()%>" required>
        </div>
        <div class="form-actions">
            <button type="submit" class="submit-button">保存</button>
            <a href="<%=request.getContextPath()%>/members" class="cancel-button">取消</a>
        </div>
    </form>
</div>

<!-- 引入 JavaScript 文件 -->
<script src="<%=request.getContextPath()%>/js/edit_member_form.js"></script>
</body>
</html>